package de.kardass.jannobatch.errorhandler;

public interface ErrorHandler<Item, T extends Throwable> {

	/**
	 * Handles the given exception with the related item and returns the handled 
	 * error with information for further processing.
	 * @param <Item>
	 * 		Which item type
	 * @param item
	 * 		The affected item
	 * @param exception
	 * 		The occurred exception
	 * @return
	 */
	HandledError<Item, T> handleException(Item item, T exception);
}
